<template>
  <div>
    <div v-if="ifSzdp">
      <HomePage></HomePage>
    </div>
    <div v-if="!ifSzdp">
      <ProjectCard></ProjectCard>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { ref, onMounted } from 'vue'
  import { useUserStore } from '@/store/modules/user'
  import HomePage from './homePage/index.vue'
  import ProjectCard from '@/views/project/projectCard/index.vue'
  const UserStore = useUserStore()
  const ifSzdp = ref(false)
  onMounted(() => {
    if (UserStore.roles.includes('ROLE_ADMIN')) {
      ifSzdp.value = true
    } else {
      ifSzdp.value = false
    }
  })
</script>
